@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["ID",
						"标题", 
						"通知内容",
						"发送时间",
                        "送达人数"];
		var _colmodel = [{name:"id", index:"id", width:100,hidden:true},
						{name:"title", index:"title", width:100},
						{name:"content", index:"content", width:100},
						{name:"ctime", index:"ctime", width:100},
						{name:"send_count", index:"send_count", width:100}];

		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>

<div class="row">
    <div class="col-xs-12">
        <div class="row-fluid" style="margin-bottom: 5px;">
            <div class="tabbable">
                <ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
                
                    <li >
                        <a data-toggle="tab" href="#" onclick="javascript:window.location.href='${basePath}/${code}/receive'" aria-expanded="false">我收到的通知</a>
                    </li>
                    <li class="active">
                        <a data-toggle="tab" href="#" onclick="javascript:window.location.href='${basePath}/${code}'" aria-expanded="true">我发出的通知</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
			@		{name:"标题", index:"title", type:"text"},
			@		{name:"通知内容", index:"content", type:"text"},
			@		{name:"通知发起人", index:"creator", type:"text"},
			@		{name:"", index:"cname", type:"text"},
			@		{name:"", index:"ctime", type:"text"}							
			@];
			<!-- include("/common/_function/_search.html",{"col":_col}){}-->
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	